package com.gdssoft.pdaweb.model.am;
/*
 *  捷达世软件（深圳）有限公司
 *  Copyright (C) 2008-2010 ShenZhen JieDaShi Software Limited Company.
*/
import java.util.Date;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

import com.gdssoft.core.model.CheckCompleteResult;
import com.gdssoft.core.model.GenericModel;
import com.gdssoft.framework.model.system.Department;
import com.gdssoft.pdaweb.model.PdaMdAssetInfo;

/**
 * PdaAmMeter Base Java Bean, base class for the.oa.model, mapped directly to database table
 * 
 * Avoid changing this file if not necessary, will be overwritten. 
 *
 * 
 */
public class PdaAmMeter extends com.gdssoft.core.model.BaseModel implements GenericModel{

    /**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String amId;
	private String position;
	private String upId;
	private String districtId;
	private String buildingId;
	private String aparmentId;
	private String aparmentName;
	private String meterKind;//用電性質（1商業，2公共，3住宅，4臨時，5事業單位）\
	private String clientId;//用戶代碼（如果是住戶，則是用戶基礎代碼，如果是單位，則是單位代碼）
	private String indoor;//'是否屋內（特殊）（0否，1是
	private String wlevel;
	private String defaultRecorderId;
	private String type;//電錶狀態（1申請，2使用，3報廢）
	private String setDate;//安裝時間
	private String inputDate;//錄入系統時間
	private String inputId;//錄入人
	private String useDate;//系統使用時間（自動取審核使用的時間）
	private String useAcceptId;//審核人
	private String meterBrand;
	private String metermodel;//型號
	private String isLongDistance;
	private String isCharge;
	private String isProportion;//是否分攤
	private Integer maxValue;
	private Integer warnValue;//警告值
	private String platcoordinates;//圖表座標
	private String expressionId;//計算公式代碼
	//private Integer amultiple;//倍率
	private String remark;
	private String createddt;
	private String createdby;
	private String lasteditby;
	private String lasteditdt;
	private String isSynCrm;
	private Date synCrmDt;
	private String isProprietor;
	private String isPlanned;
	private String isAlert;
	private Integer initDegree;
	/***
	 * 倍率
	 */
	private Float timesNum;
	
	private PdaMdAssetInfo pdaMdAssetInfo;
	private Department department;
	private Integer toCrmFlag;
	
	/**
	 * Default Empty Constructor for class PdaAmMeter
	 */
	public PdaAmMeter () {
		super();
	}
	
	/**
	 * Default Key Fields Constructor for class PdaAmMeter
	 */
	public PdaAmMeter (
		 String in_amId
        ) {
		this.setAmId(in_amId);
    }

    

	public Department getDepartment() {
		return this.department;
	}

	public void setDepartment(Department department) {
		this.department = department;
	}

	public String getIsAlert() {
		return isAlert;
	}

	public void setIsAlert(String isAlert) {
		this.isAlert = isAlert;
	}

	public Integer getInitDegree() {
		return initDegree;
	}

	public void setInitDegree(Integer initDegree) {
		this.initDegree = initDegree;
	}

	/**
	 * 	 * @return String
     * @hibernate.id column="METER_ID" type="java.lang.String" generator-class="native"
	 */
	public String getAmId() {
		return this.amId;
	}
	
	/**
	 * Set the amId
	 */	
	public void setAmId(String aValue) {
		this.amId = aValue;
	}	

	/**
	 * 	 * @return String
	 * @hibernate.property column="POSITION" type="java.lang.String" length="40" not-null="false" unique="false"
	 */
	public String getPosition() {
		return this.position;
	}
	
	/**
	 * Set the position
	 */	
	public void setPosition(String aValue) {
		this.position = aValue;
	}	

	/**
	 * 	 * @return String
	 * @hibernate.property column="UP_ID" type="java.lang.String" length="20" not-null="false" unique="false"
	 */
	public String getUpId() {
		return this.upId;
	}
	
	/**
	 * Set the upId
	 */	
	public void setUpId(String aValue) {
		this.upId = aValue;
	}	

	/**
	 * 	 * @return String
	 * @hibernate.property column="DISTRICT_ID" type="java.lang.String" length="2" not-null="false" unique="false"
	 */
	public String getDistrictId() {
		return this.districtId;
	}
	
	/**
	 * Set the districtId
	 */	
	public void setDistrictId(String aValue) {
		this.districtId = aValue;
	}	

	/**
	 * 	 * @return String
	 * @hibernate.property column="BUILDING_ID" type="java.lang.String" length="10" not-null="false" unique="false"
	 */
	public String getBuildingId() {
		return this.buildingId;
	}
	
	/**
	 * Set the buildingId
	 */	
	public void setBuildingId(String aValue) {
		this.buildingId = aValue;
	}	

	/**
	 * 	 * @return String
	 * @hibernate.property column="APARMENT_ID" type="java.lang.String" length="20" not-null="false" unique="false"
	 */
	public String getAparmentId() {
		return this.aparmentId;
	}
	
	/**
	 * Set the aparmentId
	 */	
	public void setAparmentId(String aValue) {
		this.aparmentId = aValue;
	}	

	/**
	 * 	 * @return String
	 * @hibernate.property column="METER_KIND" type="java.lang.String" length="10" not-null="false" unique="false"
	 */
	public String getMeterKind() {
		return this.meterKind;
	}
	
	/**
	 * Set the meterKind
	 */	
	public void setMeterKind(String aValue) {
		this.meterKind = aValue;
	}	

	/**
	 * 	 * @return String
	 * @hibernate.property column="CLIENT_ID" type="java.lang.String" length="20" not-null="false" unique="false"
	 */
	public String getClientId() {
		return this.clientId;
	}
	
	/**
	 * Set the clientId
	 */	
	public void setClientId(String aValue) {
		this.clientId = aValue;
	}	

	/**
	 * 	 * @return String
	 * @hibernate.property column="INDOOR" type="java.lang.String" length="1" not-null="false" unique="false"
	 */
	public String getIndoor() {
		return this.indoor;
	}
	
	/**
	 * Set the indoor
	 */	
	public void setIndoor(String aValue) {
		this.indoor = aValue;
	}	

	/**
	 * 	 * @return String
	 * @hibernate.property column="W_LEVEL" type="java.lang.String" length="1" not-null="false" unique="false"
	 */
	public String getWlevel() {
		return this.wlevel;
	}
	
	/**
	 * Set the wlevel
	 */	
	public void setWlevel(String aValue) {
		this.wlevel = aValue;
	}	

	/**
	 * 	 * @return String
	 * @hibernate.property column="DEFAULT_RECORDER_ID" type="java.lang.String" length="10" not-null="false" unique="false"
	 */
	public String getDefaultRecorderId() {
		return this.defaultRecorderId;
	}
	
	/**
	 * Set the defaultRecorderId
	 */	
	public void setDefaultRecorderId(String aValue) {
		this.defaultRecorderId = aValue;
	}	

	/**
	 * 	 * @return String
	 * @hibernate.property column="TYPE" type="java.lang.String" length="1" not-null="false" unique="false"
	 */
	public String getType() {
		return this.type;
	}
	
	/**
	 * Set the type
	 */	
	public void setType(String aValue) {
		this.type = aValue;
	}	

	/**
	 * 	 * @return String
	 * @hibernate.property column="SET_DATE" type="java.lang.String" length="50" not-null="false" unique="false"
	 */
	public String getSetDate() {
		return this.setDate;
	}
	
	/**
	 * Set the setDate
	 */	
	public void setSetDate(String aValue) {
		this.setDate = aValue;
	}	

	/**
	 * 	 * @return String
	 * @hibernate.property column="INPUT_DATE" type="java.lang.String" length="50" not-null="false" unique="false"
	 */
	public String getInputDate() {
		return this.inputDate;
	}
	
	/**
	 * Set the inputDate
	 */	
	public void setInputDate(String aValue) {
		this.inputDate = aValue;
	}	

	/**
	 * 	 * @return String
	 * @hibernate.property column="INPUT_ID" type="java.lang.String" length="10" not-null="false" unique="false"
	 */
	public String getInputId() {
		return this.inputId;
	}
	
	/**
	 * Set the inputId
	 */	
	public void setInputId(String aValue) {
		this.inputId = aValue;
	}	

	/**
	 * 	 * @return String
	 * @hibernate.property column="USE_DATE" type="java.lang.String" length="10" not-null="false" unique="false"
	 */
	public String getUseDate() {
		return this.useDate;
	}
	
	/**
	 * Set the useDate
	 */	
	public void setUseDate(String aValue) {
		this.useDate = aValue;
	}	

	/**
	 * 	 * @return String
	 * @hibernate.property column="USE_ACCEPT_ID" type="java.lang.String" length="10" not-null="false" unique="false"
	 */
	public String getUseAcceptId() {
		return this.useAcceptId;
	}
	
	/**
	 * Set the useAcceptId
	 */	
	public void setUseAcceptId(String aValue) {
		this.useAcceptId = aValue;
	}	

	/**
	 * 	 * @return String
	 * @hibernate.property column="METER_BRAND" type="java.lang.String" length="30" not-null="false" unique="false"
	 */
	public String getMeterBrand() {
		return this.meterBrand;
	}
	
	/**
	 * Set the meterBrand
	 */	
	public void setMeterBrand(String aValue) {
		this.meterBrand = aValue;
	}	

	/**
	 * 	 * @return String
	 * @hibernate.property column="METERMODEL" type="java.lang.String" length="30" not-null="false" unique="false"
	 */
	public String getMetermodel() {
		return this.metermodel;
	}
	
	/**
	 * Set the metermodel
	 */	
	public void setMetermodel(String aValue) {
		this.metermodel = aValue;
	}	

	/**
	 * 	 * @return String
	 * @hibernate.property column="IS_LONG_DISTANCE" type="java.lang.String" length="1" not-null="false" unique="false"
	 */
	public String getIsLongDistance() {
		return this.isLongDistance;
	}
	
	/**
	 * Set the isLongDistance
	 */	
	public void setIsLongDistance(String aValue) {
		this.isLongDistance = aValue;
	}	

	/**
	 * 	 * @return String
	 * @hibernate.property column="IS_CHARGE" type="java.lang.String" length="1" not-null="false" unique="false"
	 */
	public String getIsCharge() {
		return this.isCharge;
	}
	
	/**
	 * Set the isCharge
	 */	
	public void setIsCharge(String aValue) {
		this.isCharge = aValue;
	}	

	/**
	 * 	 * @return String
	 * @hibernate.property column="IS_PROPORTION" type="java.lang.String" length="1" not-null="false" unique="false"
	 */
	public String getIsProportion() {
		return this.isProportion;
	}
	
	/**
	 * Set the isProportion
	 */	
	public void setIsProportion(String aValue) {
		this.isProportion = aValue;
	}	

	/**
	 * 	 * @return Integer
	 * @hibernate.property column="MAX_VALUE" type="java.lang.Integer" length="10" not-null="false" unique="false"
	 */
	public Integer getMaxValue() {
		return this.maxValue;
	}
	
	/**
	 * Set the maxValue
	 */	
	public void setMaxValue(Integer aValue) {
		this.maxValue = aValue;
	}	

	/**
	 * 	 * @return Integer
	 * @hibernate.property column="WARN_VALUE" type="java.lang.Integer" length="10" not-null="false" unique="false"
	 */
	public Integer getWarnValue() {
		return this.warnValue;
	}
	
	/**
	 * Set the warnValue
	 */	
	public void setWarnValue(Integer aValue) {
		this.warnValue = aValue;
	}	

	/**
	 * 	 * @return String
	 * @hibernate.property column="PLATCOORDINATES" type="java.lang.String" length="10" not-null="false" unique="false"
	 */
	public String getPlatcoordinates() {
		return this.platcoordinates;
	}
	
	/**
	 * Set the platcoordinates
	 */	
	public void setPlatcoordinates(String aValue) {
		this.platcoordinates = aValue;
	}	

	/**
	 * 	 * @return String
	 * @hibernate.property column="EXPRESSION_ID" type="java.lang.String" length="10" not-null="false" unique="false"
	 */
	public String getExpressionId() {
		return this.expressionId;
	}
	
	/**
	 * Set the expressionId
	 */	
	public void setExpressionId(String aValue) {
		this.expressionId = aValue;
	}	

	/**
	 * 	 * @return Integer
	 * @hibernate.property column="AMULTIPLE" type="java.lang.Integer" length="10" not-null="false" unique="false"
	 */


	/**
	 * 	 * @return String
	 * @hibernate.property column="REMARK" type="java.lang.String" length="150" not-null="false" unique="false"
	 */
	public String getRemark() {
		return this.remark;
	}
	
	/**
	 * Set the remark
	 */	
	public void setRemark(String aValue) {
		this.remark = aValue;
	}	

	/**
	 * 	 * @return String
	 * @hibernate.property column="CREATEDDT" type="java.lang.String" length="50" not-null="false" unique="false"
	 */
	public String getCreateddt() {
		return this.createddt;
	}
	
	/**
	 * Set the createddt
	 */	
	public void setCreateddt(String aValue) {
		this.createddt = aValue;
	}	

	/**
	 * 	 * @return String
	 * @hibernate.property column="CREATEDBY" type="java.lang.String" length="20" not-null="false" unique="false"
	 */
	public String getCreatedby() {
		return this.createdby;
	}
	
	/**
	 * Set the createdby
	 */	
	public void setCreatedby(String aValue) {
		this.createdby = aValue;
	}	

	/**
	 * 	 * @return String
	 * @hibernate.property column="LASTEDITBY" type="java.lang.String" length="20" not-null="false" unique="false"
	 */
	public String getLasteditby() {
		return this.lasteditby;
	}
	
	/**
	 * Set the lasteditby
	 */	
	public void setLasteditby(String aValue) {
		this.lasteditby = aValue;
	}	

	/**
	 * 	 * @return String
	 * @hibernate.property column="LASTEDITDT" type="java.lang.String" length="50" not-null="false" unique="false"
	 */
	public String getLasteditdt() {
		return this.lasteditdt;
	}
	
	/**
	 * Set the lasteditdt
	 */	
	public void setLasteditdt(String aValue) {
		this.lasteditdt = aValue;
	}	

	/**
	 * @see java.lang.Object#equals(Object)
	 */
	
	public boolean equals(Object object) {
		if (!(object instanceof PdaAmMeter)) {
			return false;
		}
		PdaAmMeter rhs = (PdaAmMeter) object;
		return new EqualsBuilder()
				.append(this.amId, rhs.amId)
				.append(this.position, rhs.position)
				.append(this.upId, rhs.upId)
				.append(this.districtId, rhs.districtId)
				.append(this.buildingId, rhs.buildingId)
				.append(this.aparmentId, rhs.aparmentId)
				.append(this.meterKind, rhs.meterKind)
				.append(this.clientId, rhs.clientId)
				.append(this.indoor, rhs.indoor)
				.append(this.wlevel, rhs.wlevel)
				.append(this.defaultRecorderId, rhs.defaultRecorderId)
				.append(this.type, rhs.type)
				.append(this.setDate, rhs.setDate)
				.append(this.inputDate, rhs.inputDate)
				.append(this.inputId, rhs.inputId)
				.append(this.useDate, rhs.useDate)
				.append(this.useAcceptId, rhs.useAcceptId)
				.append(this.meterBrand, rhs.meterBrand)
				.append(this.metermodel, rhs.metermodel)
				.append(this.isLongDistance, rhs.isLongDistance)
				.append(this.isCharge, rhs.isCharge)
				.append(this.isProportion, rhs.isProportion)
				.append(this.maxValue, rhs.maxValue)
				.append(this.warnValue, rhs.warnValue)
				.append(this.platcoordinates, rhs.platcoordinates)
				.append(this.expressionId, rhs.expressionId)
				.append(this.remark, rhs.remark)
				.append(this.createddt, rhs.createddt)
				.append(this.createdby, rhs.createdby)
				.append(this.lasteditby, rhs.lasteditby)
				.append(this.lasteditdt, rhs.lasteditdt)
				.isEquals();
	}

	/**
	 * @see java.lang.Object#hashCode()
	 */
	public int hashCode() {
		return new HashCodeBuilder(-82280557, -700257973)
				.append(this.amId) 
				.append(this.position) 
				.append(this.upId) 
				.append(this.districtId) 
				.append(this.buildingId) 
				.append(this.aparmentId) 
				.append(this.meterKind) 
				.append(this.clientId) 
				.append(this.indoor) 
				.append(this.wlevel) 
				.append(this.defaultRecorderId) 
				.append(this.type) 
				.append(this.setDate) 
				.append(this.inputDate) 
				.append(this.inputId) 
				.append(this.useDate) 
				.append(this.useAcceptId) 
				.append(this.meterBrand) 
				.append(this.metermodel) 
				.append(this.isLongDistance) 
				.append(this.isCharge) 
				.append(this.isProportion) 
				.append(this.maxValue) 
				.append(this.warnValue) 
				.append(this.platcoordinates) 
				.append(this.expressionId) 
				.append(this.remark) 
				.append(this.createddt) 
				.append(this.createdby) 
				.append(this.lasteditby) 
				.append(this.lasteditdt) 
				.toHashCode();
	}

	/**
	 * @see java.lang.Object#toString()
	 */
	public String toString() {
		return new ToStringBuilder(this)
				.append("amId", this.amId) 
				.append("position", this.position) 
				.append("upId", this.upId) 
				.append("districtId", this.districtId) 
				.append("buildingId", this.buildingId) 
				.append("aparmentId", this.aparmentId) 
				.append("meterKind", this.meterKind) 
				.append("clientId", this.clientId) 
				.append("indoor", this.indoor) 
				.append("wlevel", this.wlevel) 
				.append("defaultRecorderId", this.defaultRecorderId) 
				.append("type", this.type) 
				.append("setDate", this.setDate) 
				.append("inputDate", this.inputDate) 
				.append("inputId", this.inputId) 
				.append("useDate", this.useDate) 
				.append("useAcceptId", this.useAcceptId) 
				.append("meterBrand", this.meterBrand) 
				.append("metermodel", this.metermodel) 
				.append("isLongDistance", this.isLongDistance) 
				.append("isCharge", this.isCharge) 
				.append("isProportion", this.isProportion) 
				.append("maxValue", this.maxValue) 
				.append("warnValue", this.warnValue) 
				.append("platcoordinates", this.platcoordinates) 
				.append("expressionId", this.expressionId) 
				.append("remark", this.remark) 
				.append("createddt", this.createddt) 
				.append("createdby", this.createdby) 
				.append("lasteditby", this.lasteditby) 
				.append("lasteditdt", this.lasteditdt) 
				.toString();
	}

	/**
	 * @return the aparmentName
	 */
	public String getAparmentName() {
		return aparmentName;
	}

	/**
	 * @param aparmentName the aparmentName to set
	 */
	public void setAparmentName(String aparmentName) {
		this.aparmentName = aparmentName;
	}

	/**
	 * @return the isSynCrm
	 */
	public String getIsSynCrm() {
		return isSynCrm;
	}

	/**
	 * @param isSynCrm the isSynCrm to set
	 */
	public void setIsSynCrm(String isSynCrm) {
		this.isSynCrm = isSynCrm;
	}

	/**
	 * @return the synCrmDt
	 */
	public Date getSynCrmDt() {
		return synCrmDt;
	}

	/**
	 * @param synCrmDt the synCrmDt to set
	 */
	public void setSynCrmDt(Date synCrmDt) {
		this.synCrmDt = synCrmDt;
	}

	/**
	 * @return the isProprietor
	 */
	public String getIsProprietor() {
		return isProprietor;
	}

	/**
	 * @param isProprietor the isProprietor to set
	 */
	public void setIsProprietor(String isProprietor) {
		this.isProprietor = isProprietor;
	}

	/**
	 * @return the isPlanned
	 */
	public String getIsPlanned() {
		return isPlanned;
	}

	/**
	 * @param isPlanned the isPlanned to set
	 */
	public void setIsPlanned(String isPlanned) {
		this.isPlanned = isPlanned;
	}

	public Float getTimesNum() {
		return timesNum;
	}

	public void setTimesNum(Float timesNum) {
		this.timesNum = timesNum;
	}

	@Override
	public CheckCompleteResult checkComplete() {
		// TODO Auto-generated method stub
		return null;
	}


	public PdaMdAssetInfo getPdaMdAssetInfo() {
		return pdaMdAssetInfo;
	}

	public void setPdaMdAssetInfo(PdaMdAssetInfo pdaMdAssetInfo) {
		this.pdaMdAssetInfo = pdaMdAssetInfo;
	}

	public Integer getToCrmFlag() {
		return toCrmFlag;
	}

	public void setToCrmFlag(Integer toCrmFlag) {
		this.toCrmFlag = toCrmFlag;
	}

}
